{% extends "base.html" %}

{% block content %}
<div class="row">
    <div class="col-12">
        <div class="jumbotron bg-primary text-white p-5 rounded mb-4">
            <h1 class="display-4">欢迎来到量子学校音乐资源共享平台</h1>
            <p class="lead">为音乐教师们提供便捷的教学资源共享服务</p>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body text-center">
                <i class="fas fa-file-powerpoint fa-3x text-primary mb-3"></i>
                <h5 class="card-title">PPT课件</h5>
                <p class="card-text">按年级和学期分类的PPT课件资源</p>
                <a href="{{ url_for('resources_page') }}?type=ppt" class="btn btn-primary">查看PPT</a>
            </div>
        </div>
    </div>
    
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body text-center">
                <i class="fas fa-book fa-3x text-success mb-3"></i>
                <h5 class="card-title">教案</h5>
                <p class="card-text">详细的教学教案和教学设计</p>
                <a href="{{ url_for('resources_page') }}?type=lesson_plan" class="btn btn-success">查看教案</a>
            </div>
        </div>
    </div>
    
    <div class="col-md-4 mb-4">
        <div class="card h-100">
            <div class="card-body text-center">
                <i class="fas fa-calendar-alt fa-3x text-info mb-3"></i>
                <h5 class="card-title">教师课表</h5>
                <p class="card-text">查看各位老师的课程安排</p>
                <a href="{{ url_for('schedules_page') }}" class="btn btn-info">查看课表</a>
            </div>
        </div>
    </div>
</div>

<div class="row mt-4">
    <div class="col-12">
        <div class="card">
            <div class="card-header">
                <h5>快速导航</h5>
            </div>
            <div class="card-body">
                <div class="row">
                    {% for grade in ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级', '初一', '初二', '初三', '高一', '高二', '高三'] %}
                    <div class="col-md-3 col-sm-6 mb-2">
                        <div class="btn-group w-100">
                            <a href="{{ url_for('resources_page') }}?grade={{ grade }}&semester=上" class="btn btn-outline-primary btn-sm">上</a>
                            <a href="{{ url_for('resources_page') }}?grade={{ grade }}&semester=下" class="btn btn-outline-primary btn-sm">下</a>
                            <span class="btn btn-light btn-sm flex-fill">{{ grade }}</span>
                        </div>
                    </div>
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row mt-4">
    <div class="col-12">
        <div class="card">
            <div class="card-header">
                <h5>使用指南</h5>
            </div>
            <div class="card-body">
                <ol>
                    <li>点击"上传资源"按钮，选择要上传的文件类型（PPT或教案）</li>
                    <li>选择对应的年级和学期，填写上传者姓名</li>
                    <li>拖拽或选择文件进行上传</li>
                    <li>在"资源列表"中按年级、学期筛选查看已上传的资源</li>
                    <li>在"教师课表"中查看各位老师的课程安排</li>
                </ol>
            </div>
        </div>
    </div>
</div>
{% endblock %}
